package scm.inventoryControl.managedbean;

import scm.inventoryControl.entity.ProductInventoryLevelEntity;
import scm.inventoryControl.session.stateless.InventoryControlSessionBean;
import java.io.Serializable;
import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import scm.inventoryControl.entity.RMInventoryLevelEntity;

@ManagedBean
@ViewScoped
public class ViewRawMaterialInventoryManagedBean implements Serializable {

    @EJB
    private InventoryControlSessionBean inventorySessionBean;
    
    private RMInventoryLevelEntity selectedInventory;
    
    
    public ViewRawMaterialInventoryManagedBean() {
    }

    public List<RMInventoryLevelEntity> getRMInventories() {
        return inventorySessionBean.getAllRawMaterialInventories();
    }

//      public void viewProcessing(ActionEvent event){
//           setSelectedInventory((ProductInventoryLevelEntity)event.getComponent().getAttributes().get("ViewRecord"));
//           System.out.println("@@@@@@@@@@@@@@@@@@@@@@@"+selectedInventory.getProductBatchRecords().get(0).getQuantity());
//           test = selectedInventory.getProductBatchRecords().get(0).getQuantity();
//           System.out.println("&&&&&&&&&&&&&&&"+test);
//      }
      
    public RMInventoryLevelEntity getSelectedInventory() {
        return selectedInventory;
    }

    public void setSelectedInventory(RMInventoryLevelEntity selectedInventory) {
        this.selectedInventory = selectedInventory;
    }

 

}
